package file;

import java.io.File;
import java.io.FileFilter;

public class LiseFilesDemo {
    public static void main(String[] args) {
       // File file = new File(".");
        File file = new File(".");
        if(file.isDirectory()) {
            File[] subs = file.listFiles(new FileFilter() {
                @Override
                public boolean accept(File fire) {
                    return fire.getName().contains("o");
                }
            });
            System.out.println(subs.length);
            for (int i = 0; i < subs.length; i++) {
                System.out.println( subs[i].getName());
            }
        }
    }
}
